<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <div class="btn" @click="onBusBuySelfClick">点击截图的vue代码</div>
    <div class="btn" @click="onVueBusClick">vueBus</div>
  </div>
</template>

<script>
import vueBusBuySelf from '../test/vuebus.js'
import vueBus from '../test/bus.js'
// import Select from '../modules/select'
export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },
  mounted(){
    vueBusBuySelf.$on('click',function(data){

    })
    
    vueBus.$on('click',function(data){

    })
    // this.select = new Select();
  },
  methods:{
      onBusBuySelfClick(){
        vueBusBuySelf.$emit('click',{
          name:'chj'
        })
      },
      onVueBusClick(){
         vueBus.$emit('click',{
          name:'vueBus'
        })
      },
   
  }

}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
